package com.twu.biblioteca;

public class User {
    private static int userNumber = 0;
    private int username = 1111111;
    private String password;
    private String name;
    private String email;
    private String phone;

    public User() {
        username += userNumber++;
    }

    public String getUsername() {
        String textUsername = Integer.toString(username);
        return textUsername.substring(0,3) + "-" + textUsername.substring(3);
    }

    public boolean verifyPassword(String password) {
        return this.password.equals(password);
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getEmail() {
        return email;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPhone() {
        return phone;
    }
}
